﻿@using JT.Domain
@model JT.Domain.Message;
@{
    ViewData["Title"] = "发送消息";
    var a = Enum.GetNames(typeof(EMSLevel));
}<form asp-action="SendMessage" method="post">
    <div class="card mt-2">
        <div asp-validation-summary="ModelOnly" class="text-danger"></div>
        <div class="card-title">
            <div class="form-group">
                <div class="pb-2">@Html.DisplayNameFor(m => m.Title) ：</div>
                <input type="text" class="form-control" asp-for="Title" />
                <span class="text-danger" asp-validation-for="Title"></span>
            </div>

        </div>
        <div class="form-group">
            <label>@Html.DisplayNameFor(m => m.Content)</label>
            <textarea class="col-12" asp-for="Content"></textarea>
            <span class="text-danger" asp-validation-for="Content"></span>
        </div>

        <div class="col-sm-4 p-0 form-group">
            <select class="form-control" asp-for="MSLevel" asp-items="Html.GetEnumSelectList<EMSLevel>()">

                <option value="">--请选择 @Html.DisplayNameFor(m => m.MSLevel) --</option>

            </select>
            <span asp-validation-for="MSLevel" class="text-danger"></span>

        </div>
        <div class="form-group">
            @*发布时间*@
            <input type="hidden" asp-for="SendTime" value="@DateTime.Now" />
            <span asp-validation-for="SendTime"></span>
        </div>

        <div class="operation">

            <button type="submit" class="btn btn-outline-success m-2">发送</button>
        </div>

    </div>
</form>



@section Scripts {
    @{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}
